package cn.itcast.order.job;

import cn.itcast.order.service.IOrderService;
import com.xxl.job.core.handler.annotation.XxlJob;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class StockJob {
    @Autowired
    private IOrderService orderService;
//    @XxlJob(value = "jobtest")
//    public void jobtest() {
//        System.out.println("xxl-job执行了");
//    }
    /**
     * 超时订单处理
     */
    @XxlJob(value = "orderTimeOut")
    public void orderTimeOut() {
        System.out.println("超时订单处理");
        orderService.orderTimeOut();
    }
}